﻿#region File Description
//-----------------------------------------------------------------------------
// Javier Cantón Ferrero
// javiercantonferrero@gmail.com
// @jcant0n
// http://geeks.ms/blogs/jcanton/
// http://xnacommunity.codeplex.com
//
// MVP XNA/DirectX
//-----------------------------------------------------------------------------
#endregion

#region Using Statements
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
#endregion

public class GameGlobals
{
    public static GraphicsDeviceManager graphicsManager;
    public static GraphicsDevice device;
    public static ContentManager content;
    public static SpriteFont defaultFont;
    public static GameTime gameTime;
    public static int Width = 480;
    public static int Height = 800;
    public static int Margin = 65;
    public static bool isExiting;
    public static Game game;

    public static int backgroundVelocity;

    public static void DrawCenterString(string str, int height, SpriteBatch spriteBatch, Color color)
    {
        spriteBatch.DrawString(GameGlobals.defaultFont, str,
            new Vector2(GameGlobals.Width / 2 - GameGlobals.defaultFont.MeasureString(str).X / 2, height), color);
    }

    public static void DrawCenterTexture(Texture2D texture, int height, SpriteBatch spriteBatch)
    {
        spriteBatch.Draw(texture,
            new Vector2(GameGlobals.Width / 2 - texture.Width / 2, height), Color.White);
    }
}